require 'watir'
include Watir
require 'test/unit'
require 'test/unit/ui/console/testrunner'
require 'watir/testUnitAddons'
require 'watir/testcase'
require 'watir/contrib/enabled_popup'
class TC_Photos < Test::Unit::TestCase
  def test_02
    $ie.goto($UniVar)
    $ie.refresh()
    
    $ie.link(:text, 'Photos').click
    $ie.image(:alt, 'Ready for the chase').click
    assert($ie.image(:alt, 'Ready for the chase').exists?)
    assert($ie.text_field(:index, 2).exists?)
    assert($ie.text_field(:index, 3).exists?)
    $ie.text_field(:index, 3).value = "www.communityserver.org"
    $ie.text_field(:index, 4).set('these are my comments')
    $ie.link(:text, 'Submit').flash
    $ie.link(:text, 'Submit').click
    $ie.wait()
    assert($ie.contains_text('these are my comments'))
  end
end